
l1=[466,546,67,32457,4374658,32,456,547,6345,34,74534,43]



def qs(a,b,l1):
    if (b-a)<1:
        return l1
    sa=a
    sb=b
    zz=a
    while a<b:
        while l1[b]>l1[zz] and zz<b:
            b-=1
        tmp=l1[b]
        l1[b]=l1[zz]
        l1[zz]=tmp
        zz=b

        while l1[a]<l1[zz] and a<zz:
            a+=1
        tmp=l1[zz]
        l1[zz]=l1[a]
        l1[a]=tmp
        zz=a
    print l1
    qs(sa,zz-1,l1)
    qs(zz+1,sb,l1)
    return l1
print l1
qs(0,len(l1)-1,l1)
print l1













